<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>
<script>
$(document).ready(function(){
	$("input[id='submit_date']").attr("readonly",true);
});
</script>

<table class="t_css table01" width="100%" border="0" cellpadding="0" id="basicInfo22222"
	cellspacing="1">
	<col style="width:25%"/>
	<col style="width:15%"/>
	<col style="width:10%"/>
	<col style="width:20%"/>
	<col style="width:15%"/>
	<col style="width:15%"/>
	<tr >
		<td   colspan="6" class="t_bar2">${param.title}</td>
	</tr>
	<tr class="li_1">
		<td align="right"><span class="color_red">*</span>项目名称：</td>
		<td colspan="5">
			<input id="zh_title"  name="proposal/zh_title" label="${param.title}-->项目名称" type="text" required class="input_css required"  style="width:87%;" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />"/> 
		</td>
	</tr>
	<tr class="li_2">
		<td align="right"><span class="color_red">*</span>项目所处阶段：</td>
		<td colspan="2">
			<label> <input type="radio" class="do " id="advant1_1" style="vertical-align: middle;" name="obj_stage" label="小试/样品/样机" value="1"  /><span style="vertical-align: middle;">小试/样品/样机</span></label> 
			<label> <input type="radio" class="do " id="advant1_2" style="vertical-align: middle;" name="obj_stage" label="中试" value="2"  /><span style="vertical-align: middle;">中试</span></label> 
			<label> <input type="radio" class="do " id="advant1_3" style="vertical-align: middle;" name="obj_stage" label="批量生产" value="3"  /><span style="vertical-align: middle;">批量生产</span></label> 
			<input type="hidden" name="proposal/obj_stage_value" id="obj_stage_value" class="required" value="<x:out select="$xmlData/data/proposal/obj_stage_value" />" label="${param.title}-->项目所处阶段" /> 
			<input type="hidden" name="proposal/obj_stage_name" id="obj_stage_name" value="<x:out select="$xmlData/data/proposal/obj_stage_name" />"  />
		</td>
		<td align="right">申报日期：</td>
		<td colspan="2">
		<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
			<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className="gray required date" label="${param.title}-->申报日期"></cpt:date> 
		</td>
	</tr>
	
	
	<tr class="li_1">
		<td align="right"><span class="color_red">*</span>产品主要应用行业：</td>
		<td colspan="2">
			<input id="product_industry" name="proposal/product_industry" label="${param.title}-->产品主要应用行业" type="text" class="input_css required" maxlength="50" style="width:65%;" value="<x:out select="$xmlData/data/proposal/product_industry"/>" />
		</td>
		<td  align="right" nowrap><span class="color_red">*</span>技术领域：</td>
		<td colspan="2">
			<c:set var="grantCode"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
			<c:set var="sub"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>
			<c:set var="researcharea_all_value"><x:out select="$xmlData/data/proposal/researcharea_all_value" /></c:set>
			<c:set var="researcharea">{'id':'<x:out select="$xmlData/data/proposal/researcharea_value" />','name':'<x:out select="$xmlData/data/proposal/researcharea_name" />'}</c:set>
			<c:if test="${empty researcharea_all_value }"><c:set var="researcharea">{'id':'<x:out select="$xmlData/data/proposal/researcharea_value" />','name':'<x:out select="$xmlData/data/proposal/researcharea_name" />'}</c:set></c:if>
         <cpt:tree key="researcharea1" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${researcharea}"  label="${param.title}-->技术领域" id="researcharea" onlyChooseLeaf="true" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue3" sqlParamVal="{grant_code:${sub},stat_year:${param.statYear }}"/>
	      <input id="researcharea_value" type="hidden" name="proposal/researcharea_value" class="required" label="${param.title}-->技术领域" value="<x:out select="$xmlData/data/proposal/researcharea_value" />"/>
         <input id="researcharea_name" type="hidden" name="proposal/researcharea_name"  value="<x:out select="$xmlData/data/proposal/researcharea_name" />"/>
         <input id="researcharea_all_name" type="hidden" name="proposal/researcharea_all_name"  value="<x:out select="$xmlData/data/proposal/researcharea_all_name" />"/>
			<input  type="hidden" id="researcharea_all_value" name="proposal/researcharea_all_value"  value="<x:out select="$xmlData/data/proposal/researcharea_all_value" />"/>
			
		</td>
	</tr>
	<tr class="li_2">
		<td align="right"><span class="color_red">*</span>项目开始时间：</td>
		<td colspan="2">
			<c:set var="start_date"><x:out select="$xmlData/data/proposal/start_date" /></c:set>
			<cpt:date id="start_date" name="proposal/start_date" value="${start_date}" className=" required date dateCompare:end_date" label="${param.title}-->项目开始时间"></cpt:date> 
		</td>
		<td align="right"><span class="color_red">*</span>项目结束时间：</td>
		<td colspan="2">
			<c:set var="end_date"><x:out select="$xmlData/data/proposal/end_date" /></c:set>
			<cpt:date id="end_date" name="proposal/end_date" value="${end_date}" className=" required date " label="${param.title}-->项目结束时间"></cpt:date> 
		</td>
	</tr>
	<tr class="li_1">
		<td align="right">项目技术是否源于相关科技计划：</td>
		<td align="center"colspan="2">
			<label> <input type="radio" class="do " id="ad_1" style="vertical-align: middle;" name="project_plan" label="是" value="1" onclick="changeText5(this);" /><span style="vertical-align: middle;">是</span></label> 
			<label> <input type="radio" class="do " id="ad_2" style="vertical-align: middle;" name="project_plan" label="否" value="2" onclick="changeText6(this);" /><span style="vertical-align: middle;">否</span></label> 
			<input type="hidden" name="proposal/project_plan_value" id="project_plan_value" value="<x:out select="$xmlData/data/proposal/project_plan_value" />" label="${param.title}-->项目技术获奖情况-->项目是否有产学研合作" /> 
			<input type="hidden" name="proposal/project_plan_name" id="project_plan_name" value="<x:out select="$xmlData/data/proposal/project_plan_name" />"  />
		</td>
		<td align="right" id="plan_no1">计划名称及编号：</td>
		<td colspan="2">
			<input id="plan_no" name="proposal/plan_no" label="${param.title}-->计划名称及编号" type="text" readonly class="gray input_css" maxlength="50" style="width:65%;" value="<x:out select="$xmlData/data/proposal/plan_no"/>" />
		</td>
	</tr>
	
	
	<tr class="li_2">
		<td align="right" rowspan="1"><span class="color_red">*</span>本项目采用的技术开发形式：</td>
		<td nowrap colspan="5" align="left">
			<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="standard_type" label="自主研究开发" value="1" /><span style="vertical-align: middle;">自主研究开发</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="standard_type" label="产学研合作开发" value="2"  /><span style="vertical-align: middle;">产学研合作开发</span></label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<label> <input type="radio" class="do " id="advant_03" style="vertical-align: middle;" name="standard_type" label="通过外部技术转让获得（大学院所、国外引进、其他）" value="3"  /><span style="vertical-align: middle;">通过外部技术转让获得（大学院所、国外引进、其他）</span></label>
			<input type="hidden" name="proposal/standard_type_value" id="standard_type_value" class="required" value="<x:out select="$xmlData/data/proposal/standard_type_value" />" label="${param.title}-->本项目采用的技术开发形式" /> 
			<input type="hidden" name="proposal/standard_type_name" id="standard_type_name" value="<x:out select="$xmlData/data/proposal/standard_type_name" />"  />
		</td>
	</tr>
	<tr class="li_1">
	<td colspan="6" >
	<span class="color_red">*</span>&nbsp;&nbsp;&nbsp;项目技术获奖情况（限100字）
	</td>
	</tr>
	<tr class="li_2">
	<td colspan="6">
	<textarea rows="3" style="width:98%;"  class="input_textarea required  maxlength:100"   name='proposal/goal/huojiangqingkuang'  label="${param.title }-->项目技术获奖情况"><x:out select="$xmlData/data/proposal/goal/huojiangqingkuang"/></textarea>
		   <input type='hidden' name='proposal/goal/huojiangqingkuang_hidden' id='proposal/goal/huojiangqingkuang_hidden' value=''>
		   </td>
		   </tr>
	
	<tr>
	<td class="t_bar2" colspan="6">项目核心技术获得知识产权情况</td>
	</tr>
</table>

<table  id="tbguishudi" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
			<thead >
					<tr style="organization_finances/financeborder:1px solid #B7D1E6">
						<th class="TblHead" align="center"  width="30px">选择</th>
						<th class="TblHead" align="center"  width="30px">序号</th>
						<th class="TblHead" align="center"  width="125px">名称</th>
						<th class="TblHead" align="center"  width="125px">类型</th>
						<th class="TblHead" align="center"  width="125px">登记号</th>
						<th class="TblHead" align="center"  >归属情况说明（不超过100字）</th> 
					</tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none">
						<td align="center">
							<input type="radio" class="radiobutton" name="selMileStones" >
						</td>
						<td align="center">
							<span name="milestones|milestone1[0]@seq_no" >[index]</span> 
						</td>
						<td align="center">
							<input name="milestones|milestone1[0]|name" label="名称" value="" class=" required input_text "  maxlength="50" style="width:80%" />
						</td>
						<td align="center">
							<cpt:select id="invention_patent1_[index]" key="invention_patent1"  name="invention_patent1" className="selectWidth2 required" label="类型" onChange="initControlValue(this.id)" value=""  style="width:85%"></cpt:select>
							<input type="hidden" name="milestones|milestone1[0]|invention_patent1_value" value=""/>
							<input type="hidden" name="milestones|milestone1[0]|invention_patent1_name" value=""/>
						</td>
						<td align="center">
							<input name="milestones|milestone1[0]|content1" label="登记号" value="" class=" required input_text "  maxlength="50" style="width:80%" />
						</td> 
						<td>
						<textarea name="milestones|milestone1[0]|content" class="input_textarea required maxlength:100" label="归属情况说明"   rows="3" style="width:98%"></textarea>
						<input type="hidden" name="milestones|milestone1[0]|content_hidden" />
						</td> 
					</tr>
					
					
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/milestones/milestone1" var="milestone">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr >
						<td align="center">
							<input type="radio" class="radiobutton" name="selMileStones" >
						</td>
						<td align="center">
							<span   name="milestones/milestone1[${flag}${index}]@seq_no" ><x:out select="$milestone/@seq_no"/></span> 
						</td>
						<td align="center">
							<input value="<x:out select="$milestone/name"/>" label="名称" name="milestones/milestone1[${flag}${index}]/name" maxlength="50" class="required input_text"  style="width:80%"  /> 
						</td>
						<td align="center">
						<c:set var="invention_patent1"><x:out select="$milestone/invention_patent1_value" /></c:set>
						<cpt:select id="invention_patent1_${index}" key="invention_patent1"  name="invention_patent1"  value="${invention_patent1}" className="selectWidth2 required" label="类型" style="width:85%" onChange="initControlValue(this.id)"></cpt:select>
						<input type="hidden" name="milestones/milestone1[${flag}${index}]/invention_patent1_value" value="<x:out select="$milestone/invention_patent1_value" />"/>
						<input type="hidden" name="milestones/milestone1[${flag}${index}]/invention_patent1_name" value="<x:out select="$milestone/invention_patent1_name" />"/>
						</td>
						<td align="center">
							<input value="<x:out select="$milestone/content1"/>" label="登记号" name="milestones/milestone1[${flag}${index}]/content1" maxlength="50" class="required input_text"  style="width:80%"  /> 
						</td> 
						<td>
							<textarea name="milestones/milestone1[${flag}${index}]/content" class="input_textarea required maxlength:100" label="归属情况说明" rows="3" style="width:98%"><x:out select="$milestone/content"/></textarea>
							<input type="hidden" name="milestones/milestone1[${flag}${index}]/content_hidden" id="milestones/milestone1[${flag}${index}]/content_hidden" value="<x:out select="$milestone/content_hidden"/>"/>
						</td>
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
					<script type="text/javascript">
						showAllDateTag("tbguishudi");
					</script>
				</tbody>
					</table>
					<br/>

					<table width="98%" align="center">
					<tr ><td>
					<input class="button" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tbguishudi',99,'项目核心技术获得知识产权情况最多只能填写99条')){addNewRow('tbguishudi');showDateTag('tbguishudi');}try{top.resizeFrame();}catch(e){};">
					<!--
					<input class="button" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tbguishudi',5,'项目进度信息最多只能填写5条')){addNewRow('tbguishudi');}showDateTag('tbguishudi');try{top.resizeFrame();}catch(e){};">
                    -->
					<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tbguishudi','selMileStones')">
					<input class="button" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tbguishudi','selMileStones')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tbguishudi','项目核心技术获得知识产权情况')">
					</td></tr>
			
	</table>
<table id="tbguishudi1" class="t_css table01" width="100%" border="0" cellpadding="0" id="proposal_goal"
	cellspacing="1">
	<tr class="li_1">
		<td class="t_bar2"><span class="color_red">*</span>项目摘要（主要用途、解决的主要问题、功能、关键技术及创新点）（不超过200字）</td>
	</tr>
			<tr>
			<td>
			<textarea name="milestones/milestone/content2" class="input_textarea required maxlength:200" label="${param.title}-->项目摘要（主要用途、解决的主要问题、功能、关键技术及创新点）"   rows="3" style="width:98%"><x:out select="$xmlData/data/milestones/milestone/content2"/></textarea>
			<input type="hidden" name="milestones/milestone/content2_hidden" value=""/>
			</td>
			</tr>
	</table>
<script>
$(document).ready(function(){
	
	if($("input[id='plan_no']").val()!=""){
		$("#plan_no").addClass("required");
		$("#plan_no").removeClass("gray");
		$("#plan_no").attr("readonly",false);
		$("#plan_no1").html('<span class="color_red">*</span>'+$(plan_no1).html());
	};
	if ($("#project_plan_value").val()=="1") {
		$("#plan_no").addClass("required");
		$("#plan_no").removeClass("gray");
		$("#plan_no").attr("readonly",false);
		$("#plan_no1").html('<span class="color_red">*</span>'+$(plan_no1).html());
	};
	
	
	
});
$(function() {
	$("#tbguishudi tr:even").addClass("li_1");
	$("#tbguishudi tr:odd").addClass("li_2");
});
function changeText5(obj){
	  if(($(obj).attr("checked")=="checked")){  
		  $("#plan_no").addClass("required");
		  $("#plan_no").removeClass("gray");
		  $("#plan_no").attr("readonly",false);  
		  $("#plan_no1").html('<span class="color_red">*</span>'+$(plan_no1).html());
	  }
}
function changeText6(obj){
	  if(($(obj).attr("checked")=="checked")){  
		  $("#plan_no").val("");
		  $("#plan_no").removeClass("required");
		  $("#plan_no").addClass("gray");
		  $("#plan_no").attr("readonly",true);  
		  document.getElementById("plan_no1").innerHTML="计划名称及编号：";
	  }
}

function initTreeValue3(treeId, treeNode) {
	var str = treeNode.name;
	var obj = treeNode.parentNode;
	while (obj != null) {
		//str = obj.name + "-" + str;
		obj = obj.parentNode;
	}
	$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
	$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
	$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
	$("#" + treeId).val(str);
	initTreeValue2CallBack();
	
	var newname=$("#researcharea_name").val();
	var no=newname.indexOf("_");
	$("#researcharea_name").val(newname.substr(0,no));
	
}
